home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
8206
/
8206.xpi
/
content
/
webmail
/
yahooclassic2.js
< prev
Wrap
Text File
|
2010-02-02
|
2KB
|
91 lines
//WISELOG("[yahooclassic2.js] >>>>>");
eventWin.addEventListener("load",function(event){yahoosig.pageload(event)},true);
eventWin.addEventListener("unload",function(event){yahoosig.uninitView(event)},true);
var yahoosig =
{
current: null,
pageload: function (event)
{
// WISELOG("[yahooclassic2.js::pageload] >>>>>");
try
{
wisestampsig.refreshCallback = yahoosig.refreshSignature;
setTimeout(function ()
{
yahoosig.setupCompose();
},
0);
} catch(e)
{
// WISELOG(e);
}
},
uninitView: function ()
{
if (this.current && this["uninit" + this.current])
{
this["uninit" + this.current]();
}
},
setupCompose: function ()
{
// WISELOG("[yahooclassic2.js::setupCompose] >>>>>");
yahoosig.addWisestampIcon();
var iframes = evaluateXPath(document, "//iframe[@id='compose_editorArea']");
if (iframes && iframes.length > 0)
{
for (var i = 0; i < iframes.length; i++)
yahoosig.insertSignature(iframes[i]);
}
},
addWisestampIcon: function ()
{
// WISELOG("[yahooclassic2.js::addWisestampIcon] >>>>>");
if (wisestampsig.showButton)
{
// WISELOG("[yahooclassic2.js::setupCompose] document.location: " + document.location);
var cont = document.getElementById("compose_palette");
var a = document.createElement("a");
a.setAttribute("class", "DhtmlButtonText");
a.setAttribute("style", "position: absolute; top: 4px; display: block; width: 26px; height: 20px; background-image: url(" + wisestampsig.icon + "); background-position: 5px 3px; background-repeat: no-repeat; left: 510px;");
a.setAttribute("title", "#href=WiseStamp")
cont.appendChild(a);
wisestampsig.initOptionsIcon(a);
}
},
uninitCompose: function ()
{
},
iframeTries: 1,
refreshSignature: function ()
{
wisestampsig.insertSignature(yahoosig.iframe, false);
},
insertSignature: function (iframe)
{
// WISELOG("[yahooclassic2.js::insertSignature] >>>>>");
this.iframe = iframe;
this.iframe.addEventListener('load', yahoosig.iframeLoad, false);
this.iframeLoad(false);
},
iframeLoad: function (event)
{
// WISELOG("[yahooclassic2.js::iframeLoad] >>>>>");
setTimeout(function ()
{
wisestampsig.insertSignature(yahoosig.iframe, true);
if (event)
{
try
{
yahoosig.iframe.removeEventListener('load', yahoosig.iframeLoad, false);
} catch(e)
{}
}
},
!event ? 500 : 100);
}
};